import request from "@/utils/request";

export function getMerchant(data) {
  return request({
    url: '/merchant',
    method: 'get',
    params:data,
  })
}

export function getMerchantDetail(data) {
  return request({
    url: '/merchant/' + data,
    method: 'get'
  })
}


export function getMerchantConfig() {
  return request({
    url: '/merchant/config' ,
    method: 'get'
  })
}

export function addMerchant(data) {
  return request({
    url: '/merchant',
    method: 'post',
    data
  })
}

export function editMerchant(data) {
  return request({
    url: '/merchant/' + data.id,
    method: 'put',
    data
  })
}

export function removeMerchant(data) {
  return request({
    url: '/merchant/' + data,
    method: 'delete'
  })
}
